﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class ajax_forum_save : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string userid = Request["userid"].ToString();
            string topicid = Request["topicid"].ToString();
            string forumcontent = Request["forumcontent"].ToString();
            forumcontent = forumcontent.Replace("'", "\"");
            forumcontent = forumcontent.Replace("\n", "<br>");

            TBBSForum oForum = new TBBSForum();
            oForum.ForumTID = topicid;
            oForum.ForumTitle = "";
            oForum.ForumContent = forumcontent;
            oForum.ForumAuthor = userid;
            oForum.Insert();

            TBBSTopic.MarkForumCount(topicid);
            //---
            Response.End();
        }
    }
}
